package net.loyintean.pearlshell.basedb.dto;

import java.io.Serializable;

class Pager implements Serializable {

	/**
	 *
	 */
	private static final long serialVersionUID = 7072807975868582567L;

	/**
	 * encapsulation.
	 * 
	 * @author Loy-winters1224@163.com
	 */
	Pager() {
		super();
	}

	/**
	 * 分页使用：页码
	 * 
	 * @author 團長
	 * @since 2013-5-15
	 */
	private Integer pageNum = 0;

	/**
	 * 分页使用：每页数据量
	 * 
	 * @author 團長
	 * @since 2013-5-15
	 */
	private Integer pageSize = 10;

	/**
	 * 分页查询的起始行号
	 * 
	 * @author chenshu-ghq
	 * @since 2013-6-13
	 */
	private Integer startIndex = 0;
	/**
	 * 分页查询的终止行号
	 * 
	 * @author chenshu-ghq
	 * @since 2013-6-13
	 */
	private Integer endIndex = 10;

	Integer getPageNum() {
		return pageNum;
	}

	void setPageNum(Integer pageNum) {
		this.pageNum = pageNum;
	}

	Integer getPageSize() {
		return pageSize;
	}

	void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}

	Integer getStartIndex() {
		return startIndex;
	}

	void setStartIndex(Integer startIndex) {
		this.startIndex = startIndex;
	}

	Integer getEndIndex() {
		return endIndex;
	}

	void setEndIndex(Integer endIndex) {
		this.endIndex = endIndex;
	}

	/**
	 * 
	 * @author Loy-winters1224@163.com
	 * @see java.lang.Object#toString()
	 * 
	 */
	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("Pager [");
		if (pageNum != null) {
			builder.append("pageNum=");
			builder.append(pageNum);
			builder.append(", ");
		}
		if (pageSize != null) {
			builder.append("pageSize=");
			builder.append(pageSize);
			builder.append(", ");
		}
		if (startIndex != null) {
			builder.append("startIndex=");
			builder.append(startIndex);
			builder.append(", ");
		}
		if (endIndex != null) {
			builder.append("endIndex=");
			builder.append(endIndex);
		}
		builder.append("]");
		return builder.toString();
	}

}
